import {
  createRouter,
  createWebHistory /* createWebHashHistory */
} from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  // hash: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    { path: '/test', component: () => import('@/views/layout/TestIndex1.vue') },
    {
      path: '/',
      component: () => import('@/views/layout/index.vue'),
      redirect: '/home',
      children: [
        {
          path: '/home',
          component: () => import('@/views/layout/HomePage.vue')
        }, // 首页
        {
          path: '/user',
          component: () => import('@/views/layout/MyPage.vue')
        } // 我的

        // {
        //   path: '/user/profile',
        //   component: () => import('@/views/user/UserProfile.vue')
        // },
      ]
    },
    {
      path: '/setting',
      component: () => import('@/views/setup/SetUp.vue')
    }, // 设置
    {
      path: '/tools',
      component: () => import('@/views/toolbox/ToolBox.vue')
    }, // 工具箱
    { path: '/search', component: () => import('@/views/search/index.vue') }, // 搜索
    {
      path: '/searchlist',
      component: () => import('@/views/search/SearchList.vue')
    }, // 搜索列表
    {
      path: '/playlist',
      component: () => import('@/views/playlist/PlayList.vue')
    }, // 歌单
    {
      path: '/tools/yyhc',
      component: () => import('@/views/toolbox/VoiceSynthesis.vue')
    }, // 语音合成
    {
      path: '/tools/sho_u',
      component: () => import('@/views/toolbox/TextEncrypt.vue')
    }, // 兽语加密
    {
      path: '/tools/yiyan',
      component: () => import('@/views/toolbox/YiYan.vue')
    }, // 随机一言
    {
      path: '/tools/riq',
      component: () => import('@/views/toolbox/RiQian.vue')
    }, // 每日日签
    {
      path: '/tools/xjj',
      component: () => import('@/views/toolbox/XJJVideo.vue')
    }, // 高质量视频
    {
      path: '/tools/meinv',
      component: () => import('@/views/toolbox/MeiNv.vue')
    }, // 随机美女
    {
      path: '/tools/tuizi',
      component: () => import('@/views/toolbox/TuiZi.vue')
    }, // 腿子
    {
      path: '/tools/boy',
      component: () => import('@/views/toolbox/BoyPicture.vue')
    }, // 帅哥图片
    {
      path: '/tools/fujiimg',
      component: () => import('@/views/toolbox/FuJiimg.vue')
    }, // 腹肌图片
    {
      path: '/tools/xgg',
      component: () => import('@/views/toolbox/XGGVideo.vue')
    } // 帅哥视频
  ]
})

export default router
